#include<map>
#include<iostream>
#include<algorithm>
using namespace std;
map<string,int> mp;
int main()
{
	int n;
	string s;
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		cin>>s;
		mp[s]=1;
	}
	for(auto iterator=mp.begin();iterator!=mp.end();iterator++)
		cout<<iterator->first<<endl;
    return 0;
}
